import { useRouteError, NavLink } from "react-router-dom";
import { Button, Result } from "antd";

import PageHeader from "../components/Header";

const ErrorPage = () => {
  const error = useRouteError();

  console.log(error);

  return (
    <>
      <PageHeader />
      <Result
        status="404"
        title="404"
        subTitle="Sorry, the page you visited does not exist."
        extra={
          <NavLink to={"/"}>
            <Button type="primary">Back Home</Button>
          </NavLink>
        }
      />
    </>
  );
};

export default ErrorPage;
